The present invention relates to a medium controller for medium-exchange type memory units that is used as peripheral equipment of a computer (for example, an autoloader in a library of magnetic tape units or optical disk units).
The events, such as opening or closing of the entry/exit door, resetting or stopping power supply for the medium controller, are hereafter referred to as medium entry/exit-enable actions. When power supply is stopped or a reset button is pressed, it becomes possible to open or close the door of the medium storage and, after that, a medium may be taken out or put into storage. This is the reason why those events are treated as the medium entry/exit-enable actions. Upon recognizing any of such events, the medium controller has medium storage information with the contents before this event automatically updated or the system site operator issues a command to have the information updated.
Conventionally, when medium storage information is to be updated automatically or by the operator issuing a command, the prior-art medium controller is unable to obtain medium entry/exit information because there is no sensor to recognize a medium in the medium storage area. As a solution, generally, the medium transfer unit (accessor) is equipped with a sensor or a bar-code reader to read a bar code on the medium and the medium transfer unit is made to access all the medium storage places (hereafter referred to as slots) where media are stored, and each time the sensor or the bar-code reader, provided for (accompanying) the accessor, recognizes a medium, the medium storage information is updated. In the prior-art medium transfer unit, each time some medium is replaced manually, the medium transfer unit accesses all medium storage places as mentioned above, taking a long time. Therefore, there is a long waiting time before the medium controller can be accessed from the system.
The conventional medium controller cannot grasp the medium storage status unless the medium transfer unit (accessor) sequentially checks all the slots; therefore, there are the following two problems.
The first problem is that, in a medium controller with a very large number of media in storage, the accessor checks every slot to see what medium is stored. This requires a long time for updating medium storage information. For this reason, in many cases, medium storage information is updated only when the operator desires. Consequently, when a medium is taken out or put into storage especially by manual operation, if the operator does not update medium storage information, it follows that the medium storage information does not match the actual storage status.
The second problem is that, in a medium controller with fewer media in storage, medium storage information is updated automatically in many cases when the condition that media are exchanged occurs, with the result that each time a medium comes in or out, the medium controller is kept waiting while the medium transfer unit is accessing all the slots and cannot perform other processing.
It is an object of the present invention to greatly reduce time for updating medium storage information when a medium entry/exit-enable action occurs during the backup operation of a computer system, particularly in the operation of the automatic (unmanned) medium controller. This significant time reduction contributes to a substantial solution of the problem of waiting time before the medium controller can be accessed. In addition, because it takes a long time to update the medium storage information in the medium controller with a large number of media in storage, the medium storage information is not necessarily updated each time a medium entry/exit-enable action occurs but the medium information is updated only when the operator thinks it necessary. Therefore, it is another object of the present invention to solve the problem of the discrepancy between medium storage information and the actual storage status. This is accomplished by the above-mentioned significant reduction in time for updating the medium information because this time saving makes it possible to automatically update the medium storage information when a medium entry/exit-enable action occurs.
According to a first aspect of the present invention, there is provided a medium controller storing a plurality of media, having a medium transfer unit to take a medium in and out of a storage place to read or write information on the medium and to transfer the medium to a place where reading and writing information is possible, and managing information about media in storage. This medium controller comprises slots for storing media; sensors, each mounted in each of the slots, for detecting whether or not there is a medium in the slot; a sensor manager for holding a log of status of the sensors in a period when media are likely to be taken in or out manually and deciding changes in the status of the sensors; and a medium information reader for reading medium information, which identifies a medium, from the medium, wherein when it is decided from a decision result by the sensor manager that the medium has been replaced, medium information is read by the medium information reader to thereby update medium storage information, or when it is decided that the medium has not been replaced, the medium storage information is not updated.
According to a second aspect of the present invention, a medium controller further comprises a door open detector for detecting that the door is open at the medium storage place of the medium controller; a door closed detector for detecting that the door is closed; a first memory for storing medium management information showing what media are stored in which slots; and a second memory for storing medium management information showing what media are stored in which slots at the moment when the door close detector detects that the above-mentioned entry/exit door is closed, wherein the medium storage information is updated by writing the medium information, which was read in by the medium information reader, in the first and second memories.
According to a third aspect of the present invention, there is provided a medium controller, wherein the sensor manager comprises a sensor status holder for storing the current sensor status of the respective slots; a log tracer for holding a log of the sensor status of the respective slots when it is found from contents of the sensor status holder that the entry/exit door is opened; and a log trace determiner for checking status changes in sensors from contents of the log tracer, wherein supposing that a sensor status that a medium exists is designated as ON and a sensor status that a medium does not exist is designated as OFF, when a decision result of the sensor status decision unit is OFFxe2x86x92ON or ONxe2x86x92ON, the medium information is read in by the medium information reader and when a decision result is ONxe2x86x92OFF, the medium information is erased and when a decision result is OFFxe2x86x92ONxe2x86x92OFF or that the sensor status remains unchanged, the medium information is not read in by the medium information reader.
According to a fourth aspect of the present invention, there is provided another medium controller storing a plurality of media therein, having a medium transfer unit to take a medium in and out of a storage place to read or write information on the medium and to transfer the medium to a place where reading and writing is possible, and managing information about media in storage. This medium controller comprises slots for storing media; magazines each including a plurality of the slots; sensors, each mounted in each of the magazines, for detecting whether or not a medium has been removed from or stored in a slot; a sensor manager for deciding detection results of sensors in a period when media are likely to be taken out or stored manually; and a medium information reader for reading medium information, which identifies a medium, from the medium, wherein when it is decided from a decision result by the sensor manager that the medium has been replaced, medium information is read by the medium information reader to thereby update the medium storage information, or when it is decided that the medium has not been replaced, the medium storage information is not updated.
According to a fifth aspect of the present invention, yet another medium controller further comprises a door open detector for detecting that the door is open at the medium storage place of the medium controller; a door closed detector for detecting that the door is closed; a first memory for storing medium management information showing what media are stored in which slots; and a second memory for storing medium management information after log tracing showing what media are stored in which slots at the moment when the door open detector detects that the above-mentioned entry/exit door is open, wherein the medium storage information is updated by writing the medium information, which was read in by the medium information reader, in the first and second memories.
According to a sixth aspect of the present invention, there is provided a control method for use in a medium controller storing a plurality of media therein, having a medium transfer unit to take a medium in and out of a storage place to read or write information on the medium and to transfer the medium to a place where reading and writing is possible, and managing information about media in storage. This method comprises the steps of skipping an updating of medium storing information when a status of a sensor remains unchanged in a period when media are likely to be removed and stored manually, said sensor being mounted in each slot where a medium is stored and detecting whether or not there is a medium in the slot; and updating the medium storing information by reading medium information from the medium via medium information reading means when a change is found in the status of the sensor from a sensor status log and it is decided from contents of said log that the medium has been replaced.
According to a seventh aspect of the present invention, there is provided another control method for use in a medium controller storing a plurality of media therein, having a medium transfer unit to take a medium in and out of a storage place to read and write information on the medium and to transfer the medium to a place where reading and writing information is possible, and managing information about media in storage. This method comprises the steps of skipping an updating of medium storing information when a sensor does not detect a medium is removed from or stored in a magazine in a period when media are likely to be stored into and removed from storage, said sensor being installed in the magazine having a plurality of slots each storing a medium therein and detecting the removal or storing of the medium; and updating medium storing information by reading medium information from the medium in all slots in the magazine via medium information reading means when said sensor detects the storing or removal of the medium and it is decided from detected contents that the medium has been replaced.
When a medium entry/exit-enable action occurred, the medium controller according to the present invention confirms the spot in the medium storage where the sensor status has changed from that before the entry/exit-enable action. If there has not been any change in the status of the sensor, the medium storage information is regarded as unchanged after the entry/exit-enable action took place and the information is not updated.
On the other hand, if a change is found in the status of the sensor, the medium controller confirms changes in the sensor status of the respective slots, and updates medium storage information of only those slots where the sensor status has changed, and uses this updated information as information after a medium went out and came in.
More specifically, the medium storage information is updated according to the contents of the status changes of sensors. When a medium is in the slot, let the sensor be ON and when there is no medium in the slot, let the sensor be OFF. For example, suppose that the medium controller may be able to recognize as follows. When the sensor switches from ON to OFF, the medium has been removed from the slot. When the sensor switches from OFF to ON, a medium has been put in the slot. When the sensor switches from ON to OFF to ON, the medium has been replaced and finally put. When the sensor switches from OFF to ON to OFF, a medium has been temporarily put in the slot and finally removed. If the medium controller can manage medium storage information as mentioned above, when the sensor switches from ON to OFF (the medium has been removed from the slot), the medium controller may erase medium storage information in the slot. When the sensor switches from OFF to ON to OFF (the medium has been eventually removed), because the medium storage information remains unchanged between before and after removal and entry of a medium, the medium controller may not update the medium storage information. When the sensor switches from OFF to ON (a medium has been put in the slot) and when the sensor switches from ON to OFF to ON (the medium has been replaced), the medium controller may check the medium storage status for any change with a sensor or a bar-code reader attached to the medium transfer unit, in other words, may read medium information by which to determine a medium that replaced the previous (hereafter referred to as medium information), and may enter medium information after the change in medium storage information. By this procedure, medium storage information can be updated accurately with a minimum of action.
If the medium controller automatically updates medium storage information as described above, processing time can be reduced markedly. Also with a medium controller managing a very large number of media in storage, even if medium storage information is updated when a medium entry/exit-enable action occurs, a waiting time in which the medium controller cannot be accessed from the system can be shortened substantially. For this reason, it is possible to make a setting such that updating of medium storage information by managing sensor status is executed automatically without relying on the operator.
Because the provision of sensors for individual slots costs a large sum of money, it is possible to install sensors at the rate of one sensor for each group of a certain number of slots (e.g., one for each magazine). This method of allocation can be implemented as follows. For example, in a case where a sensor is installed for each magazine, the medium controller checks the status of the sensor on each magazine, and then checks the medium storage status at all slots of the magazine, where a sensor status changed, with a sensor or a bar-code reader attached to the medium transfer unit, and subsequently updates medium storage information.